/** <a href="http://www.cpupk.com/decompiler">Eclipse Class Decompiler</a> plugin, Copyright (c) 2017 Chen Chao. **/
package com.minierp.controller;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.minierp.bean.CooperBillBean;
import com.minierp.bean.CooperBillItemBean;
import com.minierp.bean.OrderParameterCarrier;
import com.minierp.bean.QueryParameterBean;
import com.minierp.bean.QueryResult;
import com.minierp.bean.UserBean;
import com.minierp.bean.UserStatus;
import com.minierp.dao.AccessoryDao;
import com.minierp.dao.AdjustBillDao;
import com.minierp.dao.BankAccountBalanceDao;
import com.minierp.dao.BankAccountDetailDao;
import com.minierp.dao.BusinessBillDao;
import com.minierp.dao.BusinessBillItemDao;
import com.minierp.dao.CodeRuleDao;
import com.minierp.dao.CooperBillDao;
import com.minierp.dao.CooperBillItemDao;
import com.minierp.dao.DepartmentDao;
import com.minierp.dao.FinanceDetailDao;
import com.minierp.dao.GatherBillDao;
import com.minierp.dao.IdGenerator;
import com.minierp.dao.MakeTypeDao;
import com.minierp.dao.PayBillDao;
import com.minierp.dao.PayModeDao;
import com.minierp.dao.QueryDao;
import com.minierp.dao.TallySetDao;
import com.minierp.err.NotAllowException;
import com.minierp.err.PermissionDennyException;
import com.minierp.helper.EncCommonHelper;
import com.minierp.helper.EncCooperBillMACtrHelper;
import com.minierp.helper.EncInterceptorHelper;
import com.minierp.helper.PageHelper;
import com.minierp.model.BankAccount;
import com.minierp.model.CooperBill;
import com.minierp.model.CooperBillExt;
import com.minierp.model.CooperBillItem;
import com.minierp.model.Department;
import com.minierp.model.EnterpriseInfo;
import com.minierp.model.Establishment;
import com.minierp.model.PayMode;
import com.minierp.model.TallySet;
import com.minierp.service.CooperBillService;
import com.minierp.view.CooperBillItemListExcelView;
import com.minierp.view.CooperBillListExcelView;
import com.minierp.view.CooperBillListForAccountExcelView;
import com.minierp.view.CooperBillListForPayExcelView;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.sql.DataSource;
import org.springframework.dao.CannotAcquireLockException;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.multiaction.MultiActionController;

public class CooperBillMACtr extends MultiActionController {
	private String itemListForSelectView;
	private String searchResultView;
	private String listForExamineView;
	private String infoForExamineView;
	private String listForUnExamineView;
	private String infoForUnExamineView;
	private String listForCancelView;
	private String infoForCancelView;
	private String printView;
	private String listForEditPriceView;
	private String listForModifyView;
	private String itemSearchResultView;
	private String listForGatherView;
	private String listForPayView;
	private String listForAccountFormView;
	private String listForAccountView;
	private String dialogSuccessView;
	private String itemListForBusinessBillView;
	private String relBillListView;
	private String relBillCancelView;
	private String itemListForEstablishmentView;
	private CooperBillDao cooperBillDao;
	private CooperBillItemDao cooperBillItemDao;
	private DepartmentDao departmentDao;
	private PayBillDao payBillDao;
	private AdjustBillDao adjustBillDao;
	private BankAccountBalanceDao bankAccountBalanceDao;
	private BankAccountDetailDao bankAccountDetailDao;
	private MakeTypeDao makeTypeDao;
	private TallySetDao tallySetDao;
	private QueryDao queryDao;
	private BusinessBillDao businessBillDao;
	private BusinessBillItemDao businessBillItemDao;
	private CodeRuleDao codeRuleDao;
	private FinanceDetailDao financeDetailDao;
	private GatherBillDao gatherBillDao;
	private AccessoryDao accessoryDao;
	private PayModeDao payModeDao;
	private IdGenerator idGenerator;
	private CooperBillService cooperBillService;
	private DataSource dataSource;

	public AccessoryDao getAccessoryDao() {
		return this.accessoryDao;
	}

	public void setAccessoryDao(AccessoryDao accessoryDao) {
		this.accessoryDao = accessoryDao;
	}

	public GatherBillDao getGatherBillDao() {
		return this.gatherBillDao;
	}

	public void setGatherBillDao(GatherBillDao gatherBillDao) {
		this.gatherBillDao = gatherBillDao;
	}

	public String getRelBillListView() {
		return this.relBillListView;
	}

	public void setRelBillListView(String relBillListView) {
		this.relBillListView = relBillListView;
	}

	public String getRelBillCancelView() {
		return this.relBillCancelView;
	}

	public void setRelBillCancelView(String relBillCancelView) {
		this.relBillCancelView = relBillCancelView;
	}

	public DataSource getDataSource() {
		return this.dataSource;
	}

	public void setDataSource(DataSource dataSource) {
		this.dataSource = dataSource;
	}

	public String getItemListForSelectView() {
		return this.itemListForSelectView;
	}

	public void setItemListForSelectView(String itemListForSelectView) {
		this.itemListForSelectView = itemListForSelectView;
	}

	public MakeTypeDao getMakeTypeDao() {
		return this.makeTypeDao;
	}

	public void setMakeTypeDao(MakeTypeDao makeTypeDao) {
		this.makeTypeDao = makeTypeDao;
	}

	public QueryDao getQueryDao() {
		return this.queryDao;
	}

	public void setQueryDao(QueryDao queryDao) {
		this.queryDao = queryDao;
	}

	public ModelAndView handleItemListForSelect(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		ModelAndView mv = new ModelAndView(this.itemListForSelectView);
		QueryParameterBean b = EncCooperBillMACtrHelper
				.handleItemListForSelect(request, this.dataSource);
		QueryResult qr = this.queryDao.doQuery(b.getCurrentPage(),
				b.getPageSize(), b.getQParas(), b.getOParas(), (String[]) null,
				b.getShortNameMap(), b.getRetObjs(), (String[]) null);
		List makeTypeList = this.makeTypeDao.getList(false);

		for (int i = 0; i < qr.getList().size(); ++i) {
			Object[] objs = (Object[]) qr.getList().get(i);
			CooperBillItemBean bean = new CooperBillItemBean();
			CooperBillItem item = (CooperBillItem) objs[1];
			bean.setCooperBillItem(item);
			bean.setMakeTypeName(EncCommonHelper.getSimpleObjectName(
					makeTypeList, item.getMakeTypeId()));
			objs[1] = bean;
		}

		mv.addObject("qr", qr);
		mv.addAllObjects(b.getParameters());
		return mv;
	}

	public ModelAndView handleItemListForBusinessBill(
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		ModelAndView mv = new ModelAndView(this.itemListForBusinessBillView);
		long bbId = Long.parseLong(request.getParameter("id"));
		List list = this.cooperBillItemDao.getListForBusinessBill(bbId, true);
		List makeTypeList = this.makeTypeDao.getList(false);

		for (int i = 0; i < list.size(); ++i) {
			Object[] objs = (Object[]) list.get(i);
			CooperBillItemBean bean = new CooperBillItemBean();
			CooperBillItem item = (CooperBillItem) objs[1];
			bean.setCooperBillItem(item);
			bean.setMakeTypeName(EncCommonHelper.getSimpleObjectName(
					makeTypeList, item.getMakeTypeId()));
			objs[1] = bean;
		}

		mv.addObject("items", list);
		return mv;
	}

	public ModelAndView handleSearchResult(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (!EncCommonHelper.checkPrivilege(request, "COOP_BILL_SEAR")) {
			throw new PermissionDennyException("Permission Denny");
		} else {
			ModelAndView mv = new ModelAndView(this.searchResultView);
			QueryParameterBean b = EncCooperBillMACtrHelper.handleSearchResult(
					request, this.dataSource);
			String[] countObjs = new String[]{"sum(b.cost)", "sum(b.imprest)",
					"sum(be.paiedCost)", "sum(be.adjustCost)",
					"sum(b.favCost)", "sum(b.square)", "sum(b.lengM)",
					"sum(b.lengCm)"};
			String contentType = request.getParameter("content_type");
			QueryResult qr;
			if (contentType != null && contentType.equals("EXCEL")) {
				qr = this.queryDao.doQuery(b.getQParas(), b.getOParas(),
						(String[]) null, b.getShortNameMap(), b.getRetObjs(),
						countObjs);
				HashMap objs1 = new HashMap();
				objs1.put("list", qr.getList());
				Object[] ub1 = qr.getExtCount();
				objs1.put("costTotal", ub1[0]);
				objs1.put("imprestTotal", ub1[1]);
				objs1.put("payTotal", ub1[2]);
				objs1.put("adjustTotal", ub1[3]);
				objs1.put("favTotal", ub1[4]);
				objs1.put("squareTotal", ub1[5]);
				objs1.put("lengMTotal", ub1[6]);
				objs1.put("lengCmTotal", ub1[7]);
				CooperBillListExcelView v = new CooperBillListExcelView();
				mv = new ModelAndView(v, objs1);
				return mv;
			} else {
				qr = this.queryDao.doQuery(b.getCurrentPage(), b.getPageSize(),
						b.getQParas(), b.getOParas(), (String[]) null,
						b.getShortNameMap(), b.getRetObjs(), countObjs);
				mv.addAllObjects(b.getParameters());
				mv.addObject("qr", qr);
				Object[] objs = qr.getExtCount();
				mv.addObject("costTotal", objs[0]);
				mv.addObject("imprestTotal", objs[1]);
				mv.addObject("payTotal", objs[2]);
				mv.addObject("adjustTotal", objs[3]);
				mv.addObject("favTotal", objs[4]);
				mv.addObject("squareTotal", objs[5]);
				mv.addObject("lengMTotal", objs[6]);
				mv.addObject("lengCmTotal", objs[7]);
				UserBean ub = EncCommonHelper.getCurrentUserAccount(request);
				mv.addObject("tsList",
						PageHelper.getTallySetList(this.tallySetDao, ub));
				mv.addObject("printId", request.getParameter("print_id"));
				mv.addObject("printBill", request.getParameter("print_bill"));
				mv.addObject("printDetail",
						request.getParameter("print_detail"));
				return mv;
			}
		}
	}

	public ModelAndView handleListForExamine(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (!EncCommonHelper.checkPrivilege(request, "COOP_EXAM")) {
			throw new PermissionDennyException("Permission Denny");
		} else {
			ModelAndView mv = new ModelAndView(this.listForExamineView);
			String searchKey = request.getParameter("search_key");
			String tsId = request.getParameter("ts_id");
			UserBean ub = EncCommonHelper.getCurrentUserAccount(request);
			if (tsId == null || tsId.equals("")) {
				tsId = String.valueOf(ub.getUser().getDfTsId());
			}

			List tsList = PageHelper.getTallySetList(this.tallySetDao, ub);
			long managerId = 0L;
			if (EncCommonHelper.checkPurePrivilege(request, "BUSI_SELF")) {
				managerId = ub.getStaffer().getId();
			}

			Date allowStart = null;
			if (EncCommonHelper.checkPurePrivilege(request, "NO_EARL_DATA")) {
				allowStart = EncCommonHelper.getEarlDataDate(request);
			}

			int perPageNum = EncCommonHelper.getPageSize(request);
			int total = this.cooperBillDao.getListForExamineCount(searchKey,
					Long.parseLong(tsId), managerId, ub, allowStart);
			int pageno = EncCommonHelper.getCurrentPageIndex(request, total,
					perPageNum);
			int startIndex = (pageno - 1) * perPageNum;
			List list = this.cooperBillDao.getListForExamine(searchKey,
					Long.parseLong(tsId), managerId, ub, allowStart,
					startIndex, perPageNum);
			mv.addObject("qr", EncCommonHelper.parseQueryResult(list, total,
					perPageNum, pageno));
			mv.addObject("searchKey", searchKey);
			mv.addObject("tsId", tsId);
			mv.addObject("tsList", tsList);
			return mv;
		}
	}

	public ModelAndView handleInfoForExamine(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		ModelAndView mv = new ModelAndView(this.infoForExamineView);
		String id = request.getParameter("id");
		mv.addObject("record", this.getCooperBill(Long.parseLong(id), true));
		return mv;
	}

	public ModelAndView handleListForUnExamine(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (!EncCommonHelper.checkPrivilege(request, "COOP_UN_EXAM")) {
			throw new PermissionDennyException("Permission Denny");
		} else {
			ModelAndView mv = new ModelAndView(this.listForUnExamineView);
			String searchKey = request.getParameter("search_key");
			String tsId = request.getParameter("ts_id");
			UserBean ub = EncCommonHelper.getCurrentUserAccount(request);
			if (tsId == null || tsId.equals("")) {
				tsId = String.valueOf(ub.getUser().getDfTsId());
			}

			List tsList = PageHelper.getTallySetList(this.tallySetDao, ub);
			long managerId = 0L;
			if (EncCommonHelper.checkPurePrivilege(request, "BUSI_SELF")) {
				managerId = ub.getStaffer().getId();
			}

			Date allowStart = null;
			if (EncCommonHelper.checkPurePrivilege(request, "NO_EARL_DATA")) {
				allowStart = EncCommonHelper.getEarlDataDate(request);
			}

			int perPageNum = EncCommonHelper.getPageSize(request);
			int total = this.cooperBillDao.getListForUnExamineCount(searchKey,
					Long.parseLong(tsId), managerId, ub, allowStart);
			int pageno = EncCommonHelper.getCurrentPageIndex(request, total,
					perPageNum);
			int startIndex = (pageno - 1) * perPageNum;
			List list = this.cooperBillDao.getListForUnExamine(searchKey,
					Long.parseLong(tsId), managerId, ub, allowStart,
					startIndex, perPageNum);
			mv.addObject("qr", EncCommonHelper.parseQueryResult(list, total,
					perPageNum, pageno));
			mv.addObject("searchKey", searchKey);
			mv.addObject("tsId", tsId);
			mv.addObject("tsList", tsList);
			return mv;
		}
	}

	public ModelAndView handleInfoForUnExamine(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		ModelAndView mv = new ModelAndView(this.infoForUnExamineView);
		String id = request.getParameter("id");
		mv.addObject("record", this.getCooperBill(Long.parseLong(id), true));
		return mv;
	}

	public ModelAndView handleListForCancel(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (!EncCommonHelper.checkPrivilege(request, "COOP_CANC")) {
			throw new PermissionDennyException("Permission Denny");
		} else {
			ModelAndView mv = new ModelAndView(this.listForCancelView);
			QueryParameterBean b = EncCooperBillMACtrHelper
					.handleListForCancel(request, this.dataSource);
			QueryResult qr = this.queryDao.doQuery(b.getCurrentPage(),
					b.getPageSize(), b.getQParas(), b.getOParas(),
					(String[]) null, b.getShortNameMap(), b.getRetObjs(),
					(String[]) null);
			mv.addObject("qr", qr);
			mv.addAllObjects(b.getParameters());
			mv.addObject("departmentList", this.departmentDao.getList(true));
			UserBean ub = EncCommonHelper.getCurrentUserAccount(request);
			mv.addObject("tsList",
					PageHelper.getTallySetList(this.tallySetDao, ub));
			return mv;
		}
	}

	public ModelAndView handleInfoForCancel(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		ModelAndView mv = new ModelAndView(this.infoForCancelView);
		String id = request.getParameter("id");
		mv.addObject("record", this.getCooperBill(Long.parseLong(id), true));
		return mv;
	}

	private CooperBillBean getCooperBill(long id, boolean needAccssories) {
		CooperBill cooperBill = (CooperBill) this.cooperBillDao.get(
				CooperBill.class, id);
		CooperBillExt be = (CooperBillExt) this.cooperBillDao.get(
				CooperBillExt.class, id);
		CooperBillBean form = new CooperBillBean();
		form.setCooperBill(cooperBill);
		form.setCooperBillExt(be);
		List itemList = this.cooperBillItemDao.getList(cooperBill.getId());
		List makeTypeList = this.makeTypeDao.getList(false);
		String areaFlag = "N";
		String amountFlag = "N";
		String lengthFlag = "N";
		ArrayList arr = new ArrayList();

		for (int est = 0; est < itemList.size(); ++est) {
			CooperBillItemBean accList = new CooperBillItemBean();
			CooperBillItem item = (CooperBillItem) itemList.get(est);
			accList.setCooperBillItem(item);
			accList.setMakeTypeName(EncCommonHelper.getSimpleObjectName(
					makeTypeList, item.getMakeTypeId()));
			arr.add(accList);
			if (item.getPriceType().equals("AMOUNT")) {
				amountFlag = "Y";
			}

			if (item.getPriceType().equals("AREA")) {
				areaFlag = "Y";
			}

			if (item.getPriceType().equals("LENGTH")) {
				lengthFlag = "Y";
			}
		}

		form.setItems(arr);
		form.setHasAmountItem(amountFlag);
		form.setHasAreaItem(areaFlag);
		form.setHasLengthItem(lengthFlag);
		if (cooperBill != null) {
			Establishment arg15 = (Establishment) this.cooperBillDao.get(
					Establishment.class, cooperBill.getCooperatorId());
			if (arg15 != null) {
				form.setCooperatorName(arg15.getEstName());
			}

			if (cooperBill.getBankAccountId() != 0L) {
				BankAccount arg16 = (BankAccount) this.cooperBillDao.get(
						BankAccount.class, cooperBill.getBankAccountId());
				if (arg16 != null) {
					form.setBankAccountName(arg16.getBankName());
				}
			}

			if (cooperBill.getPayModeId() != 0L) {
				PayMode arg17 = (PayMode) this.cooperBillDao.get(PayMode.class,
						cooperBill.getPayModeId());
				if (arg17 != null) {
					form.setPayModeName(arg17.getModeName());
				}
			}

			if (cooperBill.getDepartmentId() != 0L) {
				Department arg18 = (Department) this.cooperBillDao.get(
						Department.class, cooperBill.getDepartmentId());
				if (arg18 != null) {
					form.setDepartmentName(arg18.getDepartmentName());
				}
			}

			if (cooperBill.getTallySetId() != 0L) {
				TallySet arg19 = (TallySet) this.cooperBillDao.get(
						TallySet.class, cooperBill.getTallySetId());
				if (arg19 != null) {
					form.setTallySetName(arg19.getTitle());
				}
			}

			if (needAccssories) {
				List arg20 = this.accessoryDao.getList("COOPER_BILL", id,
						(String[]) null, 0L);
				form.setAccessories(arg20);
			}
		}

		return form;
	}

	public ModelAndView handleExamine(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		ModelAndView mv = new ModelAndView(this.dialogSuccessView);
		UserBean ub = EncCommonHelper.getCurrentUserAccount(request);
		String idStr = request.getParameter("id_str");
		String flag = request.getParameter("flag");
		boolean examined = false;
		if (flag != null && flag.equals("1")) {
			examined = true;
		}

		String[] arr = idStr.split(";");
		boolean num = false;
		String msg;
		byte arg18;
		if (!examined) {
			if (!EncCommonHelper.checkPrivilege(request, "COOP_UN_EXAM")) {
				throw new Exception("Permission deny!");
			}

			try {
				for (int examinerId = 0; examinerId < arr.length; ++examinerId) {
					this.cooperBillService.txUnExamine(
							Long.parseLong(arr[examinerId]),
							this.cooperBillDao, this.bankAccountBalanceDao,
							this.bankAccountDetailDao, this.cooperBillItemDao,
							this.businessBillDao, this.idGenerator,
							this.financeDetailDao, ub);
				}

				msg = "反审核成功";
			} catch (CannotAcquireLockException arg16) {
				msg = "事务冲突故障，请重新操作！";
			} catch (NotAllowException arg17) {
				msg = arg17.getMessage();
			}

			arg18 = 1;
		} else {
			if (!EncCommonHelper.checkPrivilege(request, "COOP_EXAM")) {
				throw new Exception("Permission deny!");
			}

			long arg19 = ub.getStaffer().getId();
			String examinerName = ub.getStaffer().getStafferName();

			try {
				for (int w = 0; w < arr.length; ++w) {
					this.cooperBillService.txExamine(Long.parseLong(arr[w]),
							this.cooperBillDao, this.payBillDao,
							this.adjustBillDao, arg19, examinerName,
							this.bankAccountBalanceDao, this.cooperBillItemDao,
							this.businessBillDao, this.idGenerator);
				}

				msg = "审核成功";
			} catch (CannotAcquireLockException arg14) {
				msg = "事务冲突故障，请重新操作！";
			} catch (NotAllowException arg15) {
				msg = arg15.getMessage();
			}

			arg18 = 1;
		}

		mv.addObject("returnValue", String.valueOf(arg18));
		EncCommonHelper.setAlertMessage(request, msg);
		return mv;
	}

	public ModelAndView handleCancel(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		ModelAndView mv = new ModelAndView(this.dialogSuccessView);
		UserBean ub = EncCommonHelper.getCurrentUserAccount(request);
		EnterpriseInfo ent = EncCommonHelper.getEnterpriseInfo(request);
		if (!EncCommonHelper.checkPrivilege(request, "COOP_CANC")) {
			throw new Exception("Permission deny!");
		} else {
			String reason = request.getParameter("reason");
			String id = request.getParameter("id");

			String msg;
			try {
				msg = this.cooperBillService.txCancel(Long.parseLong(id),
						reason, ent, this.cooperBillItemDao, ub,
						this.bankAccountBalanceDao, this.bankAccountDetailDao,
						this.businessBillDao, this.businessBillItemDao,
						this.idGenerator, this.financeDetailDao);
			} catch (CannotAcquireLockException arg9) {
				msg = "事务冲突故障，请重新操作！";
			}

			mv.addObject("returnValue", id);
			EncCommonHelper.setAlertMessage(request, msg);
			return mv;
		}
	}

	public ModelAndView handlePrint(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		String id = request.getParameter("id");
		ModelAndView mv = new ModelAndView(this.printView);
		mv.addObject("record", this.getCooperBill(Long.parseLong(id), false));
		mv.addObject("id", id);
		mv.addObject("codeRule", this.codeRuleDao.get("COOPER_BILL"));
		return mv;
	}

	public ModelAndView handleListForEditPrice(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (!EncCommonHelper.checkPrivilege(request, "COOP_EDIT_PRIC")) {
			throw new PermissionDennyException("Permission Denny");
		} else {
			ModelAndView mv = new ModelAndView(this.listForEditPriceView);
			QueryParameterBean b = EncCooperBillMACtrHelper
					.handleListForEditPrice(request, this.dataSource);
			QueryResult qr = this.queryDao.doQuery(b.getCurrentPage(),
					b.getPageSize(), b.getQParas(), b.getOParas(),
					(String[]) null, b.getShortNameMap(), b.getRetObjs(),
					(String[]) null);
			mv.addObject("qr", qr);
			mv.addAllObjects(b.getParameters());
			mv.addObject("departmentList", this.departmentDao.getList(true));
			mv.addObject("tsList", PageHelper.getTallySetList(this.tallySetDao,
					EncCommonHelper.getCurrentUserAccount(request)));
			return mv;
		}
	}

	public ModelAndView handleListForModify(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (!EncCommonHelper.checkPrivilege(request, "COOP_MODI")) {
			throw new PermissionDennyException("Permission Denny");
		} else {
			ModelAndView mv = new ModelAndView(this.listForModifyView);
			QueryParameterBean b = EncCooperBillMACtrHelper
					.handleListForModify(request, this.dataSource);
			QueryResult qr = this.queryDao.doQuery(b.getCurrentPage(),
					b.getPageSize(), b.getQParas(), b.getOParas(),
					(String[]) null, b.getShortNameMap(), b.getRetObjs(),
					(String[]) null);
			mv.addObject("qr", qr);
			mv.addAllObjects(b.getParameters());
			mv.addObject("departmentList", this.departmentDao.getList(true));
			mv.addObject("tsList", PageHelper.getTallySetList(this.tallySetDao,
					EncCommonHelper.getCurrentUserAccount(request)));
			return mv;
		}
	}

	public ModelAndView handleItemSearchResult(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (!EncCommonHelper.checkPrivilege(request, "COOP_ITEM_SEAR")) {
			throw new PermissionDennyException("Permission Denny");
		} else {
			String contentType = request.getParameter("content_type");
			List depList = this.departmentDao.getList(true);
			List makeTypeList = this.makeTypeDao.getList(false);
			QueryParameterBean b = EncCooperBillMACtrHelper
					.handleItemSearchResult(request, this.dataSource);
			String[] retObjs = new String[]{"i.priceType", "i.lengType",
					"sum(i.cost)", "sum(i.squareNum)"};
			List list = this.queryDao.doQuery(b.getQParas(),
					(OrderParameterCarrier[]) null,
					new String[]{"i.priceType", "i.lengType"},
					b.getShortNameMap(), retObjs, (String[]) null).getList();
			BigDecimal costTotal = new BigDecimal(0);
			BigDecimal squareTotal = new BigDecimal(0);
			BigDecimal lengMTotal = new BigDecimal(0);
			BigDecimal lengCmTotal = new BigDecimal(0);

			for (int billTotal = 0; billTotal < list.size(); ++billTotal) {
				Object[] objs = (Object[]) list.get(billTotal);
				if (objs[0] != null) {
					if (objs[1] != null) {
						costTotal = costTotal.add(new BigDecimal(objs[2]
								.toString()));
					}

					if (objs[0].toString().equals("AREA")) {
						squareTotal = squareTotal.add(new BigDecimal(objs[3]
								.toString()));
					} else if (objs[0].toString().equals("LENGTH")) {
						if (objs[1].toString().equals("M")) {
							lengMTotal = lengMTotal.add(new BigDecimal(objs[3]
									.toString()));
						} else {
							lengCmTotal = lengCmTotal.add(new BigDecimal(
									objs[3].toString()));
						}
					}
				}
			}

			squareTotal = squareTotal.setScale(2, 4);
			lengMTotal = lengMTotal.setScale(2, 4);
			lengCmTotal = lengCmTotal.setScale(2, 4);
			list = this.queryDao.doQuery(b.getQParas(),
					(OrderParameterCarrier[]) null, (String[]) null,
					b.getShortNameMap(), new String[]{"count(distinct b.id)"},
					(String[]) null).getList();
			String arg18 = "0";
			if (list.size() > 0 && list.get(0) != null) {
				arg18 = list.get(0).toString();
			}

			ModelAndView mv;
			QueryResult qr;
			if (contentType != null && contentType.equals("EXCEL")) {
				qr = this.queryDao.doQuery(b.getQParas(), b.getOParas(),
						(String[]) null, b.getShortNameMap(), b.getRetObjs(),
						(String[]) null);
				this.parseDetailBean(qr.getList(), depList, makeTypeList);
				HashMap arg19 = new HashMap();
				arg19.put("list", qr.getList());
				arg19.put("costTotal", costTotal);
				arg19.put("squareTotal", squareTotal);
				arg19.put("lengMTotal", lengMTotal);
				arg19.put("lengCmTotal", lengCmTotal);
				arg19.put("billTotal", arg18);
				CooperBillItemListExcelView v = new CooperBillItemListExcelView();
				mv = new ModelAndView(v, arg19);
				return mv;
			} else {
				qr = this.queryDao.doQuery(b.getCurrentPage(), b.getPageSize(),
						b.getQParas(), b.getOParas(), (String[]) null,
						b.getShortNameMap(), b.getRetObjs(), (String[]) null);
				this.parseDetailBean(qr.getList(), depList, makeTypeList);
				mv = new ModelAndView(this.itemSearchResultView);
				mv.addAllObjects(b.getParameters());
				mv.addObject("costTotal", costTotal);
				mv.addObject("squareTotal", squareTotal);
				mv.addObject("lengMTotal", lengMTotal);
				mv.addObject("lengCmTotal", lengCmTotal);
				mv.addObject("billTotal", arg18);
				mv.addObject("qr", qr);
				mv.addObject("depList", depList);
				mv.addObject("makeTypeList", this.makeTypeDao.getList(true));
				UserBean ub = EncCommonHelper.getCurrentUserAccount(request);
				mv.addObject("tsList",
						PageHelper.getTallySetList(this.tallySetDao, ub));
				return mv;
			}
		}
	}

	private void parseDetailBean(List<?> list, List<?> depList,
			List<?> makeTypeList) {
		for (int i = 0; i < list.size(); ++i) {
			Object[] objs = (Object[]) list.get(i);
			CooperBill bill = (CooperBill) objs[0];
			CooperBillItem bi = (CooperBillItem) objs[2];
			CooperBillBean bBean = new CooperBillBean();
			bBean.setCooperBill(bill);
			bBean.setDepartmentName(EncCommonHelper.getSimpleObjectName(
					depList, bill.getDepartmentId()));
			CooperBillItemBean biBean = new CooperBillItemBean();
			biBean.setCooperBillItem(bi);
			biBean.setMakeTypeName(EncCommonHelper.getSimpleObjectName(
					makeTypeList, bi.getMakeTypeId()));
			objs[0] = bBean;
			objs[2] = biBean;
		}

	}

	public ModelAndView handleListForGather(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (!EncCommonHelper.checkPrivilege(request, "GATH_BILL")) {
			throw new PermissionDennyException("Permission Denny");
		} else {
			ModelAndView mv = new ModelAndView(this.listForGatherView);
			String type = request.getParameter("type");
			String tsId = request.getParameter("ts_id");
			String searchKey = request.getParameter("search_key");
			if (type == null) {
				type = "";
			}

			String gathered = "";
			String timeout = "";
			if (type.equals("UN_GATHER")) {
				gathered = "N";
			} else if (type.equals("UN_GATH_TIMEOUT")) {
				gathered = "N";
				timeout = "Y";
			} else if (type.equals("PART_GATH")) {
				gathered = "P";
			}

			UserBean ub = EncCommonHelper.getCurrentUserAccount(request);
			long managerId = 0L;
			if (EncCommonHelper.checkPurePrivilege(request, "BUSI_SELF")) {
				managerId = ub.getStaffer().getId();
			}

			Date allowStart = null;
			if (EncCommonHelper.checkPurePrivilege(request, "NO_EARL_DATA")) {
				allowStart = EncCommonHelper.getEarlDataDate(request);
			}

			if (tsId == null || tsId.equals("")) {
				tsId = String.valueOf(ub.getUser().getDfTsId());
			}

			int perPageNum = EncCommonHelper.getPageSize(request);
			int total = this.cooperBillDao.getListForGatherCount(gathered,
					timeout, searchKey, Long.parseLong(tsId), ub, managerId,
					allowStart);
			int pageno = EncCommonHelper.getCurrentPageIndex(request, total,
					perPageNum);
			int startIndex = (pageno - 1) * perPageNum;
			List list = this.cooperBillDao.getListForGather(gathered, timeout,
					searchKey, Long.parseLong(tsId), ub, managerId, allowStart,
					startIndex, perPageNum);
			mv.addObject("qr", EncCommonHelper.parseQueryResult(list, total,
					perPageNum, pageno));
			mv.addObject("type", type);
			mv.addObject("tsId", tsId);
			mv.addObject("searchKey", searchKey);
			mv.addObject("tsList",
					PageHelper.getTallySetList(this.tallySetDao, ub));
			mv.addObject("printId", request.getParameter("print_id"));
			mv.addObject("printCost", request.getParameter("print_cost"));
			return mv;
		}
	}

	public ModelAndView handleGetCoopForPay(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		String clientId = request.getParameter("est_id");
		String tsId = request.getParameter("ts_id");
		SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
		String startDateStr = request.getParameter("start_date");
		String endDateStr = request.getParameter("end_date");
		Date startDate = null;
		Date endDate = null;
		if (startDateStr != null && !startDateStr.equals("")) {
			startDate = sf.parse(startDateStr);
		}

		if (endDateStr != null && !endDateStr.equals("")) {
			endDate = sf.parse(EncCommonHelper.getNextDateStr(endDateStr,
					"yyyy-MM-dd"));
		}

		List list = this.cooperBillDao.getListForPay(Long.parseLong(clientId),
				Long.parseLong(tsId), startDate, endDate);
		HashMap map = new HashMap();

		try {
			ArrayList mapper = new ArrayList();

			for (int json = 0; json < list.size(); ++json) {
				HashMap out = new HashMap();
				Object[] objs = (Object[]) list.get(json);
				CooperBill b = (CooperBill) objs[0];
				CooperBillExt be = (CooperBillExt) objs[1];
				out.put("id", Long.valueOf(b.getId()));
				out.put("code", b.getBillCode());
				out.put("date", sf.format(b.getCooperDate()));
				out.put("totaCost", b.getCost());
				out.put("remaCost", b.getCost().add(be.getAdjustCost())
						.subtract(be.getPaiedCost()));
				out.put("cont", b.getContent());
				mapper.add(out);
			}

			map.put("items", mapper);
			map.put("status", "OK");
			map.put("errMsg", "");
		} catch (Exception arg17) {
			map.put("status", "ERROR");
			map.put("errMsg", arg17.toString());
		}

		response.setContentType("text/plain");
		response.setCharacterEncoding("utf-8");
		response.setHeader("Cache-Control", "no-cache");
		response.setHeader("Pragma", "no-cache");
		ObjectMapper arg18 = new ObjectMapper();
		String arg19 = arg18.writeValueAsString(map);
		ServletOutputStream arg20 = response.getOutputStream();
		arg20.write(arg19.getBytes("utf-8"));
		arg20.flush();
		arg20.close();
		return null;
	}

	public ModelAndView handleListForPay(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (!EncCommonHelper.checkPrivilege(request, "COOP_UN_PAY")) {
			throw new PermissionDennyException("Permission Denny");
		} else {
			ModelAndView mv = new ModelAndView(this.listForPayView);
			UserBean ub = EncCommonHelper.getCurrentUserAccount(request);
			String startDateStr = "";
			String endDateStr = "";
			String estName = "";
			String billCode = "";
			String content = "";
			String minCost = "";
			String maxCost = "";
			String pm = "0";
			String tsId = "0";
			SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
			Date startDate = null;
			Date endDate = null;
			int total = 0;
			long managerId = 0L;
			if (EncCommonHelper.checkPurePrivilege(request, "BUSI_SELF")) {
				managerId = ub.getStaffer().getId();
			}

			Date allowStart = null;
			if (EncCommonHelper.checkPurePrivilege(request, "NO_EARL_DATA")) {
				allowStart = EncCommonHelper.getEarlDataDate(request);
			}

			String searchType = request.getParameter("search_type");
			mv.addObject("startDate", request.getParameter("start_date"));
			mv.addObject("endDate", request.getParameter("end_date"));
			mv.addObject("estName", request.getParameter("est_name"));
			mv.addObject("billCode", request.getParameter("bill_code"));
			mv.addObject("content", request.getParameter("content"));
			mv.addObject("minCost", request.getParameter("min_cost"));
			mv.addObject("maxCost", request.getParameter("max_cost"));
			mv.addObject("tsId", request.getParameter("ts_id"));
			mv.addObject("pm", request.getParameter("pm"));
			List cList;
			String contentType;
			if (searchType != null && !searchType.equals("")) {
				if (searchType.equals("2")) {
					startDateStr = request.getParameter("start_date");
					endDateStr = request.getParameter("end_date");
					if (startDateStr != null && !startDateStr.equals("")) {
						startDate = sf.parse(startDateStr);
						if (allowStart != null && allowStart.after(startDate)) {
							startDate = allowStart;
						}
					} else {
						startDate = allowStart;
					}

					if (endDateStr != null && !endDateStr.equals("")) {
						endDate = sf.parse(EncCommonHelper.getNextDateStr(
								endDateStr, "yyyy-MM-dd"));
					}

					cList = this.cooperBillDao.getListForPayCount("",
							startDate, endDate, "", "", "", "", 0L, 0L,
							managerId, ub);
				} else {
					String costTotal = request.getParameter("cb_coo_date");
					String paiedTotal = request.getParameter("cb_est");
					String adjustTotal = request.getParameter("cb_bill_code");
					contentType = request.getParameter("cb_content");
					String perPageNum = request.getParameter("cb_cost");
					String pageno = request.getParameter("cb_ts");
					String startIndex = request.getParameter("cb_pm");
					if (costTotal != null && costTotal.equals("1")) {
						startDateStr = request.getParameter("start_date");
						endDateStr = request.getParameter("end_date");
						startDate = sf.parse(startDateStr);
						if (allowStart != null && allowStart.after(startDate)) {
							startDate = allowStart;
						}

						endDate = sf.parse(EncCommonHelper.getNextDateStr(
								endDateStr, "yyyy-MM-dd"));
						mv.addObject("cbCooDate", costTotal);
					} else {
						startDate = allowStart;
					}

					if (paiedTotal != null && paiedTotal.equals("1")) {
						estName = request.getParameter("est_name");
						mv.addObject("cbEst", paiedTotal);
					}

					if (adjustTotal != null && adjustTotal.equals("1")) {
						billCode = request.getParameter("bill_code");
						mv.addObject("cbBillCode", adjustTotal);
					}

					if (contentType != null && contentType.equals("1")) {
						content = request.getParameter("content");
						mv.addObject("cbContent", contentType);
					}

					if (perPageNum != null && perPageNum.equals("1")) {
						minCost = request.getParameter("min_cost");
						maxCost = request.getParameter("max_cost");
						mv.addObject("cbCost", perPageNum);
					}

					if (startIndex != null && startIndex.equals("1")) {
						pm = request.getParameter("pm");
						mv.addObject("cbPm", startIndex);
					}

					if (pageno != null && pageno.equals("1")) {
						tsId = request.getParameter("ts_id");
						mv.addObject("cbTs", pageno);
					}

					cList = this.cooperBillDao.getListForPayCount(estName,
							startDate, endDate, billCode, content, minCost,
							maxCost, Long.parseLong(pm), Long.parseLong(tsId),
							managerId, ub);
				}
			} else {
				searchType = "1";
				startDate = allowStart;
				tsId = String.valueOf(ub.getUser().getDfTsId());
				cList = this.cooperBillDao.getListForPayCount("", allowStart,
						(Date) null, "", "", "", "", 0L, Long.parseLong(tsId),
						managerId, ub);
				mv.addObject("tsId", tsId);
				mv.addObject("cbTs", "1");
			}

			mv.addObject("searchType", searchType);
			BigDecimal costTotal1 = new BigDecimal(0);
			BigDecimal paiedTotal1 = new BigDecimal(0);
			BigDecimal adjustTotal1 = new BigDecimal(0);
			if (cList != null && !cList.isEmpty()) {
				Object[] contentType1 = (Object[]) cList.get(0);
				if (contentType1 != null) {
					if (contentType1[0] != null) {
						total = Integer.parseInt(contentType1[0].toString());
					}

					if (contentType1[1] != null) {
						costTotal1 = new BigDecimal(contentType1[1].toString());
					}

					if (contentType1[2] != null) {
						paiedTotal1 = new BigDecimal(contentType1[2].toString());
					}

					if (contentType1[3] != null) {
						adjustTotal1 = new BigDecimal(
								contentType1[3].toString());
					}
				}
			}

			contentType = request.getParameter("content_type");
			if (contentType != null && contentType.equals("EXCEL")) {
				HashMap perPageNum2 = new HashMap();
				List pageno2 = this.cooperBillDao.getListForPay(estName,
						startDate, endDate, billCode, content, minCost,
						maxCost, Long.parseLong(pm), Long.parseLong(tsId),
						managerId, ub, 0, total);
				perPageNum2.put("list", pageno2);
				perPageNum2.put("pmList", this.payModeDao.getList(false));
				perPageNum2.put("remainTotal", costTotal1.add(adjustTotal1)
						.subtract(paiedTotal1).toString());
				CooperBillListForPayExcelView startIndex2 = new CooperBillListForPayExcelView();
				return new ModelAndView(startIndex2, perPageNum2);
			} else {
				int perPageNum1 = EncCommonHelper.getPageSize(request);
				int pageno1 = EncCommonHelper.getCurrentPageIndex(request,
						total, perPageNum1);
				int startIndex1 = (pageno1 - 1) * perPageNum1;
				List list = this.cooperBillDao.getListForPay(estName,
						startDate, endDate, billCode, content, minCost,
						maxCost, Long.parseLong(pm), Long.parseLong(tsId),
						managerId, ub, startIndex1, perPageNum1);
				mv.addObject("qr", EncCommonHelper.parseQueryResult(list,
						total, perPageNum1, pageno1));
				mv.addObject("pmList", this.payModeDao.getList(false));
				mv.addObject("tsList",
						PageHelper.getTallySetList(this.tallySetDao, ub));
				mv.addObject("remainTotal", costTotal1.add(adjustTotal1)
						.subtract(paiedTotal1));
				mv.addObject("printId", request.getParameter("print_id"));
				mv.addObject("printBill", request.getParameter("print_bill"));
				mv.addObject("printDetail",
						request.getParameter("print_detail"));
				return mv;
			}
		}
	}

	public ModelAndView handleListForAccountForm(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (!EncCommonHelper.checkPrivilege(request, "COOP_ACCO")) {
			throw new PermissionDennyException("Permission Denny");
		} else {
			Date now = new Date();
			SimpleDateFormat dateSf = new SimpleDateFormat("yyyy-MM-dd");
			String endDate = dateSf.format(now);
			return (new ModelAndView(this.listForAccountFormView)).addObject(
					"end_date", endDate);
		}
	}

	public ModelAndView handleListForAccount(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		ModelAndView mv = new ModelAndView(this.listForAccountView);
		String contentType = request.getParameter("content_type");
		String cooperatorId = request.getParameter("cooperator_id");
		QueryParameterBean b = EncCooperBillMACtrHelper
				.handleListForAccountList(request, this.dataSource);
		mv.addAllObjects(b.getParameters());
		QueryResult qr = this.queryDao.doQuery(b.getQParas(), b.getOParas(),
				(String[]) null, b.getShortNameMap(), b.getRetObjs(),
				(String[]) null);
		List mtList = this.makeTypeDao.getList(false);
		Establishment est = (Establishment) this.cooperBillDao.get(
				Establishment.class, Long.parseLong(cooperatorId));
		BigDecimal costTotal = new BigDecimal(0);
		BigDecimal payTotal = new BigDecimal(0);
		BigDecimal adjustTotal = new BigDecimal(0);
		BigDecimal favTotal = new BigDecimal(0);
		b = EncCooperBillMACtrHelper.handleListForAccountCost(request,
				this.dataSource);
		List list = this.queryDao.doQuery(b.getQParas(),
				(OrderParameterCarrier[]) null, (String[]) null,
				b.getShortNameMap(), b.getRetObjs(), (String[]) null).getList();
		if (list != null && !list.isEmpty()) {
			Object[] remainTotal = (Object[]) list.get(0);
			if (remainTotal[0] != null) {
				costTotal = new BigDecimal(remainTotal[0].toString());
			}

			if (remainTotal[1] != null) {
				payTotal = new BigDecimal(remainTotal[1].toString());
			}

			if (remainTotal[2] != null) {
				adjustTotal = new BigDecimal(remainTotal[2].toString());
			}

			if (remainTotal[3] != null) {
				favTotal = new BigDecimal(remainTotal[3].toString());
			}
		}

		BigDecimal remainTotal1 = costTotal.add(adjustTotal).subtract(payTotal);
		if (contentType != null && contentType.equals("EXCEL")) {
			HashMap map = new HashMap();
			map.put("start_date", request.getParameter("start_date"));
			map.put("end_date", request.getParameter("end_date"));
			map.put("list", qr.getList());
			map.put("est", est);
			map.put("mtList", mtList);
			map.put("costTotal", costTotal);
			map.put("payTotal", payTotal);
			map.put("favTotal", favTotal);
			map.put("adjustTotal", adjustTotal);
			map.put("remainTotal", remainTotal1);
			CooperBillListForAccountExcelView v = new CooperBillListForAccountExcelView();
			return new ModelAndView(v, map);
		} else {
			mv.addObject("qr", qr);
			mv.addObject("est", est);
			mv.addObject("mtList", mtList);
			mv.addObject("costTotal", costTotal);
			mv.addObject("payTotal", payTotal);
			mv.addObject("adjustTotal", adjustTotal);
			mv.addObject("favTotal", favTotal);
			mv.addObject("remainTotal", remainTotal1);
			mv.addObject("codeRule", this.codeRuleDao.get("COOPER_BILL"));
			mv.addObject("printId", request.getParameter("print_id"));
			mv.addObject("printBill", request.getParameter("print_bill"));
			mv.addObject("printDetail", request.getParameter("print_detail"));
			return mv;
		}
	}

	public ModelAndView handleRelBillList(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		ModelAndView mv = new ModelAndView(this.relBillListView);
		long id = Long.parseLong(request.getParameter("id"));
		String code = request.getParameter("code");
		mv.addObject("gatherList", this.gatherBillDao.getListByCooperBill(id));
		mv.addObject("payList", this.payBillDao.getList("COOPER", id));
		mv.addObject("adjustList",
				this.adjustBillDao.getList("COOPER_BILL", id));
		mv.addObject("accList", this.accessoryDao.getList("COOPER_BILL", id,
				(String[]) null, 0L));
		List itemList = this.cooperBillItemDao.getList(id);
		List makeTypeList = this.makeTypeDao.getList(false);
		ArrayList arr = new ArrayList();

		for (int i = 0; i < itemList.size(); ++i) {
			CooperBillItemBean bean = new CooperBillItemBean();
			CooperBillItem item = (CooperBillItem) itemList.get(i);
			bean.setCooperBillItem(item);
			bean.setMakeTypeName(EncCommonHelper.getSimpleObjectName(
					makeTypeList, item.getMakeTypeId()));
			arr.add(bean);
		}

		mv.addObject("itemList", arr);
		mv.addObject("id", String.valueOf(id));
		mv.addObject("code", code);
		return mv;
	}

	public ModelAndView handleRelBillCancel(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		ModelAndView mv = new ModelAndView(this.relBillCancelView);
		long id = Long.parseLong(request.getParameter("id"));
		String code = request.getParameter("code");
		mv.addObject("gatherList", this.gatherBillDao.getListByCooperBill(id));
		mv.addObject("payList", this.payBillDao.getList("COOPER", id));
		mv.addObject("adjustList",
				this.adjustBillDao.getList("COOPER_BILL", id));
		mv.addObject("code", code);
		return mv;
	}

	public ModelAndView handleItemListForEstablishment(
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		ModelAndView mv = new ModelAndView(this.itemListForEstablishmentView);
		String clientId = request.getParameter("id");
		mv.addObject("id", clientId);
		QueryParameterBean b = EncCooperBillMACtrHelper
				.handleItemListForEstablishment(request, this.dataSource);
		String[] countObjs = new String[]{"sum(i.cost)"};
		QueryResult qr = this.queryDao.doQuery(b.getCurrentPage(),
				b.getPageSize(), b.getQParas(), b.getOParas(), (String[]) null,
				b.getShortNameMap(), b.getRetObjs(), countObjs);
		mv.addObject("costTotal", qr.getExtCount()[0]);
		List makeTypeList = this.makeTypeDao.getList(false);

		for (int i = 0; i < qr.getList().size(); ++i) {
			Object[] objs = (Object[]) qr.getList().get(i);
			CooperBillItemBean bean = new CooperBillItemBean();
			CooperBillItem item = (CooperBillItem) objs[1];
			bean.setCooperBillItem(item);
			bean.setMakeTypeName(EncCommonHelper.getSimpleObjectName(
					makeTypeList, item.getMakeTypeId()));
			objs[1] = bean;
		}

		mv.addObject("qr", qr);
		mv.addObject(
				"est",
				this.cooperBillDao.get(Establishment.class,
						Long.parseLong(clientId)));
		return mv;
	}

	public ModelAndView handleAppList(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		HashMap map = new HashMap();
		UserStatus s = EncInterceptorHelper.checkAppUserSignon(request);
		UserBean ub = s.getUserBean();
		String json;
		if (ub == null) {
			map.put("status", "NO_LOGIN");
			map.put("errMsg", "");
		} else if (!EncCommonHelper.checkPrivilege(request, "COOP_BILL_SEAR")) {
			map.put("status", "ERROR");
			map.put("errMsg", "您还没有此功能的使用权限，请确认返回！");
		} else {
			try {
				String mapper = request.getParameter("est_name");
				json = request.getParameter("start_date");
				String out = request.getParameter("end_date");
				String exam = request.getParameter("exam");
				String paie = request.getParameter("paie");
				String tsIdStr = request.getParameter("ts_id");
				String orde = request.getParameter("orde");
				String showPrev = request.getParameter("show_prev");
				String initQuer = request.getParameter("init_quer");
				long mngId = 0L;
				long tsId = 0L;
				if (tsIdStr != null && !tsIdStr.equals("")) {
					tsId = Long.parseLong(tsIdStr);
				}

				if (EncCommonHelper.checkPurePrivilege(request, "BUSI_SELF")) {
					mngId = ub.getStaffer().getId();
				}

				Date allowStart = null;
				Date startDate = null;
				Date endDate = null;
				if (EncCommonHelper.checkPurePrivilege(request, "NO_EARL_DATA")) {
					allowStart = EncCommonHelper.getEarlDataDate(request);
				}

				SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
				SimpleDateFormat sfl = new SimpleDateFormat("yyyy-MM-dd HH:mm");
				if (json != null && !json.equals("")) {
					startDate = sf.parse(json);
				}

				if (out != null && !out.equals("")) {
					endDate = sf.parse(EncCommonHelper.getNextDateStr(out,
							"yyyy-MM-dd"));
				}

				if (startDate == null) {
					startDate = allowStart;
				} else if (allowStart != null && allowStart.after(startDate)) {
					startDate = allowStart;
				}

				if (orde == null || orde.equals("")) {
					orde = "COOP_DATE";
				}

				int total = 0;
				BigDecimal cost = new BigDecimal(0);
				BigDecimal remCost = new BigDecimal(0);
				List list = this.cooperBillDao.getAppListCount(startDate,
						endDate, mapper, exam, paie, tsId, ub, mngId);
				if (list != null && !list.isEmpty() && list.get(0) != null) {
					Object[] perPageNum = (Object[]) list.get(0);
					if (perPageNum[1] != null) {
						total = Integer.parseInt(perPageNum[0].toString());
						cost = (BigDecimal) perPageNum[1];
						remCost = (BigDecimal) perPageNum[2];
					}
				}

				map.put("cost", cost);
				map.put("remCost", remCost);
				map.put("total", Integer.valueOf(total));
				int arg40 = EncCommonHelper.getPageSize(request);
				int pageno = EncCommonHelper.getCurrentPageIndex(request,
						total, arg40);
				if (total > pageno * arg40) {
					map.put("more", "Y");
				} else {
					map.put("more", "N");
				}

				if (showPrev != null && showPrev.equals("Y")) {
					list = this.cooperBillDao.getAppList(startDate, endDate,
							mapper, exam, paie, tsId, ub, mngId, orde, 0,
							pageno * arg40);
				} else {
					list = this.cooperBillDao.getAppList(startDate, endDate,
							mapper, exam, paie, tsId, ub, mngId, orde,
							(pageno - 1) * arg40, arg40);
				}

				ArrayList items = new ArrayList();

				for (int tmpList = 0; tmpList < list.size(); ++tmpList) {
					HashMap tsItems = new HashMap();
					Object[] i = (Object[]) list.get(tmpList);
					CooperBill item = (CooperBill) i[0];
					String ts = (String) i[1];
					String creaTime = "";
					CooperBillExt be = (CooperBillExt) i[2];
					if (item.getLinkman() != null
							&& !item.getLinkman().equals("")) {
						ts = ts + "(" + item.getLinkman() + ")";
					}

					if (item.getCreateTime() != null) {
						creaTime = sfl.format(item.getCreateTime());
					}

					tsItems.put("cost", item.getCost());
					tsItems.put(
							"remCost",
							item.getCost().add(be.getAdjustCost())
									.subtract(be.getPaiedCost()));
					tsItems.put("creaName", item.getCreaterName());
					tsItems.put("creaTime", creaTime);
					tsItems.put("estName", ts);
					tsItems.put("id", Long.valueOf(item.getId()));
					tsItems.put("date", sf.format(item.getCooperDate()));
					tsItems.put("cont", PageHelper.parseNull(item.getContent()));
					if (be.getPaied().equals("Y")) {
						tsItems.put("stat", "PAIE");
					} else if (be.getExamined().equals("Y")) {
						tsItems.put("stat", "EXAM");
					} else {
						tsItems.put("stat", "UNEXAM");
					}

					items.add(tsItems);
				}

				map.put("items", items);
				if (initQuer != null && initQuer.equals("Y")) {
					List arg41 = PageHelper.getTallySetList(this.tallySetDao,
							ub);
					ArrayList arg42 = new ArrayList();

					for (int arg43 = 0; arg43 < arg41.size(); ++arg43) {
						HashMap arg44 = new HashMap();
						TallySet arg45 = (TallySet) arg41.get(arg43);
						arg44.put("id", Long.valueOf(arg45.getId()));
						arg44.put("name", arg45.getTitle());
						arg42.add(arg44);
					}

					map.put("tsItems", arg42);
				}

				map.put("status", "OK");
				map.put("errMsg", "");
			} catch (Exception arg37) {
				map.put("status", "ERROR");
				map.put("errMsg", arg37.toString());
			}
		}

		response.setContentType("text/plain");
		response.setCharacterEncoding("utf-8");
		response.setHeader("Cache-Control", "no-cache");
		response.setHeader("Pragma", "no-cache");
		ObjectMapper arg38 = new ObjectMapper();
		json = arg38.writeValueAsString(map);
		ServletOutputStream arg39 = response.getOutputStream();
		arg39.write(json.getBytes("utf-8"));
		arg39.flush();
		arg39.close();
		return null;
	}

	public ModelAndView handleAppInfo(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		HashMap map = new HashMap();

		try {
			long mapper = Long.parseLong(request.getParameter("id"));
			CooperBill out = (CooperBill) this.cooperBillDao.get(
					CooperBill.class, mapper);
			CooperBillExt be = (CooperBillExt) this.cooperBillDao.get(
					CooperBillExt.class, mapper);
			List itemList = this.cooperBillItemDao.getList(mapper);
			List mtList = this.makeTypeDao.getList(false);
			SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
			SimpleDateFormat sfl = new SimpleDateFormat("yyyy-MM-dd HH:mm");
			String bankName = "";
			String estName = "";
			String gathDate = "";
			String tsName = "";
			String creaTime = "";
			if (out.getBankAccountId() != 0L) {
				BankAccount est = (BankAccount) this.cooperBillDao.get(
						BankAccount.class, out.getBankAccountId());
				if (est != null) {
					bankName = est.getBankName();
					if (est.getAccountName() != null
							&& !est.getAccountName().equals("")) {
						bankName = bankName + "(" + est.getAccountName() + ")";
					}
				}
			}

			if (out.getGatherDate() != null) {
				gathDate = sf.format(out.getGatherDate());
			}

			Establishment arg30 = (Establishment) this.cooperBillDao.get(
					Establishment.class, out.getCooperatorId());
			if (arg30 != null) {
				estName = arg30.getEstName();
			}

			TallySet ts = (TallySet) this.cooperBillDao.get(TallySet.class,
					out.getTallySetId());
			if (ts != null) {
				tsName = ts.getTitle();
			}

			if (out.getCreateTime() != null) {
				creaTime = sfl.format(out.getCreateTime());
			}

			map.put("cost", out.getCost());
			map.put("favCost", out.getFavCost());
			map.put("impr", out.getImprest());
			map.put("addr", PageHelper.parseNull(out.getAddress()));
			map.put("ba", bankName);
			map.put("code", out.getBillCode());
			map.put("cont", PageHelper.parseNull(out.getContent()));
			map.put("creaName", out.getCreaterName());
			map.put("creaTime", creaTime);
			map.put("estName", estName);
			map.put("gathDate", gathDate);
			map.put("lm", PageHelper.parseNull(out.getLinkman()));
			map.put("mark", PageHelper.parseNull(out.getMark()));
			map.put("mngName", PageHelper.parseNull(out.getManagerName()));
			map.put("date", sf.format(out.getCooperDate()));
			map.put("phon", PageHelper.parseNull(out.getPhone()));
			map.put("setu", PageHelper.parseNull(out.getSetupRequire()));
			String examName = "";
			String examTime = "";
			if (be.getExamined().equals("Y")) {
				examName = be.getExaminerName();
				if (be.getExamineTime() != null) {
					examTime = sfl.format(be.getExamineTime());
				}
			}

			map.put("exam", be.getExamined());
			map.put("examName", examName);
			map.put("examTime", examTime);
			map.put("tsName", tsName);
			ArrayList items = new ArrayList();
			BigDecimal itemTotal = new BigDecimal(0);

			for (int i = 0; i < itemList.size(); ++i) {
				HashMap item = new HashMap();
				CooperBillItem bi = (CooperBillItem) itemList.get(i);
				String spec = PageHelper.parseNull(bi.getSpecification());
				String unit = "";
				if (bi.getPriceType().equals("AMOUNT")) {
					item.put("amou",
							EncCommonHelper.parseBigDecimal(bi.getAmount()));
					unit = PageHelper.parseNull(bi.getUnit());
				} else {
					item.put("amou", bi.getSquareNum());
					if (bi.getPriceType().equals("LENGTH")) {
						if (bi.getLengType().equals("M")) {
							unit = "米";
						} else {
							unit = "公分";
						}
					} else {
						unit = "平方米";
					}

					spec = spec + " x "
							+ EncCommonHelper.parseBigDecimal(bi.getAmount());
				}

				item.put("cost", bi.getCost());
				item.put("pric",
						EncCommonHelper.parseBigDecimal(bi.getUnitPrice()));
				item.put("cont", PageHelper.parseNull(bi.getFinishedContent()));
				item.put(
						"mtName",
						EncCommonHelper.getSimpleObjectName(mtList,
								bi.getMakeTypeId()));
				item.put("prod", PageHelper.parseNull(bi.getProName()));
				item.put("requ", PageHelper.parseNull(bi.getMakeRequire()));
				item.put("spec", spec);
				item.put("unit", unit);
				item.put("bbCode", PageHelper.parseNull(bi.getBbCode()));
				items.add(item);
				itemTotal = itemTotal.add(bi.getCost());
			}

			map.put("itemTotal", itemTotal);
			map.put("items", items);
			map.put("status", "OK");
			map.put("errMsg", "");
		} catch (Exception arg27) {
			map.put("status", "ERROR");
			map.put("errMsg", arg27.toString());
		}

		response.setContentType("text/plain");
		response.setCharacterEncoding("utf-8");
		response.setHeader("Cache-Control", "no-cache");
		response.setHeader("Pragma", "no-cache");
		ObjectMapper arg28 = new ObjectMapper();
		String json = arg28.writeValueAsString(map);
		ServletOutputStream arg29 = response.getOutputStream();
		arg29.write(json.getBytes("utf-8"));
		arg29.flush();
		arg29.close();
		return null;
	}

	public ModelAndView handleAppListForExam(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		HashMap map = new HashMap();
		UserStatus s = EncInterceptorHelper.checkAppUserSignon(request);
		UserBean ub = s.getUserBean();
		String json;
		if (ub == null) {
			map.put("status", "NO_LOGIN");
			map.put("errMsg", "");
		} else if (!EncCommonHelper.checkPrivilege(request, "COOP_EXAM")) {
			map.put("status", "ERROR");
			map.put("errMsg", "您还没有此功能的使用权限，请确认返回！");
		} else {
			try {
				String mapper = request.getParameter("sk");
				json = request.getParameter("ts_id");
				String out = request.getParameter("show_prev");
				String initQuer = request.getParameter("init_quer");
				long mngId = 0L;
				long tsId = 0L;
				if (json != null && !json.equals("")) {
					tsId = Long.parseLong(json);
				}

				if (EncCommonHelper.checkPurePrivilege(request, "BUSI_SELF")) {
					mngId = ub.getStaffer().getId();
				}

				Date allowStart = null;
				if (EncCommonHelper.checkPurePrivilege(request, "NO_EARL_DATA")) {
					allowStart = EncCommonHelper.getEarlDataDate(request);
				}

				int total = 0;
				BigDecimal cost = new BigDecimal(0);
				List list = this.cooperBillDao.getAppListForExamCount(mapper,
						tsId, ub, allowStart, mngId);
				if (list != null && !list.isEmpty() && list.get(0) != null) {
					Object[] perPageNum = (Object[]) list.get(0);
					if (perPageNum[1] != null) {
						total = Integer.parseInt(perPageNum[0].toString());
						cost = (BigDecimal) perPageNum[1];
					}
				}

				map.put("cost", cost);
				map.put("total", Integer.valueOf(total));
				int arg31 = EncCommonHelper.getPageSize(request);
				int pageno = EncCommonHelper.getCurrentPageIndex(request,
						total, arg31);
				if (total > pageno * arg31) {
					map.put("more", "Y");
				} else {
					map.put("more", "N");
				}

				if (out != null && out.equals("Y")) {
					list = this.cooperBillDao.getAppListForExam(mapper, tsId,
							ub, allowStart, mngId, 0, pageno * arg31);
				} else {
					list = this.cooperBillDao.getAppListForExam(mapper, tsId,
							ub, allowStart, mngId, (pageno - 1) * arg31, arg31);
				}

				SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
				SimpleDateFormat sfl = new SimpleDateFormat("yyyy-MM-dd HH:mm");
				ArrayList items = new ArrayList();

				for (int tmpList = 0; tmpList < list.size(); ++tmpList) {
					Object[] tsItems = (Object[]) list.get(tmpList);
					CooperBill i = (CooperBill) tsItems[0];
					String item = (String) tsItems[1];
					String ts = "";
					if (i.getLinkman() != null && !i.getLinkman().equals("")) {
						item = item + "(" + i.getLinkman() + ")";
					}

					if (i.getCreateTime() != null) {
						ts = sfl.format(i.getCreateTime());
					}

					HashMap item1 = new HashMap();
					item1.put("cost", i.getCost());
					item1.put("creaName", i.getCreaterName());
					item1.put("creaTime", ts);
					item1.put("estName", item);
					item1.put("id", Long.valueOf(i.getId()));
					item1.put("date", sf.format(i.getCooperDate()));
					items.add(item1);
				}

				map.put("items", items);
				if (initQuer != null && initQuer.equals("Y")) {
					List arg32 = PageHelper.getTallySetList(this.tallySetDao,
							ub);
					ArrayList arg33 = new ArrayList();

					for (int arg34 = 0; arg34 < arg32.size(); ++arg34) {
						HashMap arg35 = new HashMap();
						TallySet arg36 = (TallySet) arg32.get(arg34);
						arg35.put("id", Long.valueOf(arg36.getId()));
						arg35.put("name", arg36.getTitle());
						arg33.add(arg35);
					}

					map.put("tsItems", arg33);
				}

				map.put("status", "OK");
				map.put("errMsg", "");
			} catch (Exception arg28) {
				map.put("status", "ERROR");
				map.put("errMsg", arg28.toString());
			}
		}

		response.setContentType("text/plain");
		response.setCharacterEncoding("utf-8");
		response.setHeader("Cache-Control", "no-cache");
		response.setHeader("Pragma", "no-cache");
		ObjectMapper arg29 = new ObjectMapper();
		json = arg29.writeValueAsString(map);
		ServletOutputStream arg30 = response.getOutputStream();
		arg30.write(json.getBytes("utf-8"));
		arg30.flush();
		arg30.close();
		return null;
	}

	public ModelAndView handleAppListForUnExam(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		HashMap map = new HashMap();
		UserStatus s = EncInterceptorHelper.checkAppUserSignon(request);
		UserBean ub = s.getUserBean();
		String json;
		if (ub == null) {
			map.put("status", "NO_LOGIN");
			map.put("errMsg", "");
		} else if (!EncCommonHelper.checkPrivilege(request, "COOP_UN_EXAM")) {
			map.put("status", "ERROR");
			map.put("errMsg", "您还没有此功能的使用权限，请确认返回！");
		} else {
			try {
				String mapper = request.getParameter("sk");
				json = request.getParameter("ts_id");
				String out = request.getParameter("show_prev");
				String initQuer = request.getParameter("init_quer");
				long mngId = 0L;
				long tsId = 0L;
				if (json != null && !json.equals("")) {
					tsId = Long.parseLong(json);
				}

				if (EncCommonHelper.checkPurePrivilege(request, "BUSI_SELF")) {
					mngId = ub.getStaffer().getId();
				}

				Date allowStart = null;
				if (EncCommonHelper.checkPurePrivilege(request, "NO_EARL_DATA")) {
					allowStart = EncCommonHelper.getEarlDataDate(request);
				}

				int total = this.cooperBillDao.getAppListForUnExamCount(mapper,
						tsId, ub, allowStart, mngId);
				int perPageNum = EncCommonHelper.getPageSize(request);
				int pageno = EncCommonHelper.getCurrentPageIndex(request,
						total, perPageNum);
				if (total > pageno * perPageNum) {
					map.put("more", "Y");
				} else {
					map.put("more", "N");
				}

				List list;
				if (out != null && out.equals("Y")) {
					list = this.cooperBillDao.getAppListForUnExam(mapper, tsId,
							ub, allowStart, mngId, 0, pageno * perPageNum);
				} else {
					list = this.cooperBillDao.getAppListForUnExam(mapper, tsId,
							ub, allowStart, mngId, (pageno - 1) * perPageNum,
							perPageNum);
				}

				SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
				SimpleDateFormat sfl = new SimpleDateFormat("yyyy-MM-dd HH:mm");
				ArrayList items = new ArrayList();

				for (int tmpList = 0; tmpList < list.size(); ++tmpList) {
					Object[] tsItems = (Object[]) list.get(tmpList);
					CooperBill i = (CooperBill) tsItems[0];
					String item = (String) tsItems[1];
					if (i.getLinkman() != null && !i.getLinkman().equals("")) {
						item = item + "(" + i.getLinkman() + ")";
					}

					HashMap ts = new HashMap();
					ts.put("cost", i.getCost());
					ts.put("examName", tsItems[2]);
					ts.put("examTime", sfl.format((Date) tsItems[3]));
					ts.put("estName", item);
					ts.put("id", Long.valueOf(i.getId()));
					ts.put("date", sf.format(i.getCooperDate()));
					items.add(ts);
				}

				map.put("items", items);
				if (initQuer != null && initQuer.equals("Y")) {
					List arg29 = PageHelper.getTallySetList(this.tallySetDao,
							ub);
					ArrayList arg30 = new ArrayList();

					for (int arg31 = 0; arg31 < arg29.size(); ++arg31) {
						HashMap arg32 = new HashMap();
						TallySet arg33 = (TallySet) arg29.get(arg31);
						arg32.put("id", Long.valueOf(arg33.getId()));
						arg32.put("name", arg33.getTitle());
						arg30.add(arg32);
					}

					map.put("tsItems", arg30);
				}

				map.put("status", "OK");
				map.put("errMsg", "");
			} catch (Exception arg26) {
				map.put("status", "ERROR");
				map.put("errMsg", arg26.toString());
			}
		}

		response.setContentType("text/plain");
		response.setCharacterEncoding("utf-8");
		response.setHeader("Cache-Control", "no-cache");
		response.setHeader("Pragma", "no-cache");
		ObjectMapper arg27 = new ObjectMapper();
		json = arg27.writeValueAsString(map);
		ServletOutputStream arg28 = response.getOutputStream();
		arg28.write(json.getBytes("utf-8"));
		arg28.flush();
		arg28.close();
		return null;
	}

	public ModelAndView handleAppExam(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		UserStatus s = EncInterceptorHelper.checkAppUserSignon(request);
		UserBean ub = s.getUserBean();
		String status = "";
		String errMsg = "";
		if (ub == null) {
			status = "NO_LOGIN";
		} else {
			String map = request.getParameter("type");
			String mapper = request.getParameter("id");
			if (map != null && map.equals("UNEXAM")) {
				if (!EncCommonHelper.checkPrivilege(request, "COOP_UN_EXAM")) {
					status = "ERROR";
					errMsg = "您还没有此功能的使用权限，请确认返回！";
				} else {
					try {
						this.cooperBillService.txUnExamine(
								Long.parseLong(mapper), this.cooperBillDao,
								this.bankAccountBalanceDao,
								this.bankAccountDetailDao,
								this.cooperBillItemDao, this.businessBillDao,
								this.idGenerator, this.financeDetailDao, ub);
						status = "OK";
					} catch (CannotAcquireLockException arg12) {
						status = "ERROR";
						errMsg = "事务冲突故障，请重新操作！";
					} catch (NotAllowException arg13) {
						status = "ERROR";
						errMsg = arg13.getMessage();
					}
				}
			} else if (!EncCommonHelper.checkPrivilege(request, "COOP_EXAM")) {
				status = "ERROR";
				errMsg = "您还没有此功能的使用权限，请确认返回！";
			} else {
				try {
					this.cooperBillService.txExamine(Long.parseLong(mapper),
							this.cooperBillDao, this.payBillDao,
							this.adjustBillDao, ub.getStaffer().getId(), ub
									.getStaffer().getStafferName(),
							this.bankAccountBalanceDao, this.cooperBillItemDao,
							this.businessBillDao, this.idGenerator);
					status = "OK";
				} catch (NotAllowException arg10) {
					status = "ERROR";
					errMsg = arg10.getMessage();
				} catch (CannotAcquireLockException arg11) {
					status = "ERROR";
					errMsg = "事务冲突故障，请重新操作！";
				}
			}
		}

		HashMap map1 = new HashMap();
		map1.put("status", status);
		map1.put("errMsg", errMsg);
		ObjectMapper mapper1 = new ObjectMapper();
		String json = mapper1.writeValueAsString(map1);
		ServletOutputStream out = response.getOutputStream();
		out.write(json.getBytes("utf-8"));
		out.flush();
		out.close();
		return null;
	}

	public String getSearchResultView() {
		return this.searchResultView;
	}

	public void setSearchResultView(String searchResultView) {
		this.searchResultView = searchResultView;
	}

	public TallySetDao getTallySetDao() {
		return this.tallySetDao;
	}

	public void setTallySetDao(TallySetDao tallySetDao) {
		this.tallySetDao = tallySetDao;
	}

	public CooperBillDao getCooperBillDao() {
		return this.cooperBillDao;
	}

	public void setCooperBillDao(CooperBillDao cooperBillDao) {
		this.cooperBillDao = cooperBillDao;
	}

	public CooperBillItemDao getCooperBillItemDao() {
		return this.cooperBillItemDao;
	}

	public void setCooperBillItemDao(CooperBillItemDao cooperBillItemDao) {
		this.cooperBillItemDao = cooperBillItemDao;
	}

	public String getInfoForCancelView() {
		return this.infoForCancelView;
	}

	public void setInfoForCancelView(String infoForCancelView) {
		this.infoForCancelView = infoForCancelView;
	}

	public String getInfoForExamineView() {
		return this.infoForExamineView;
	}

	public void setInfoForExamineView(String infoForExamineView) {
		this.infoForExamineView = infoForExamineView;
	}

	public String getInfoForUnExamineView() {
		return this.infoForUnExamineView;
	}

	public void setInfoForUnExamineView(String infoForUnExamineView) {
		this.infoForUnExamineView = infoForUnExamineView;
	}

	public String getListForCancelView() {
		return this.listForCancelView;
	}

	public void setListForCancelView(String listForCancelView) {
		this.listForCancelView = listForCancelView;
	}

	public String getListForExamineView() {
		return this.listForExamineView;
	}

	public void setListForExamineView(String listForExamineView) {
		this.listForExamineView = listForExamineView;
	}

	public String getListForUnExamineView() {
		return this.listForUnExamineView;
	}

	public void setListForUnExamineView(String listForUnExamineView) {
		this.listForUnExamineView = listForUnExamineView;
	}

	public AdjustBillDao getAdjustBillDao() {
		return this.adjustBillDao;
	}

	public void setAdjustBillDao(AdjustBillDao adjustBillDao) {
		this.adjustBillDao = adjustBillDao;
	}

	public BankAccountBalanceDao getBankAccountBalanceDao() {
		return this.bankAccountBalanceDao;
	}

	public void setBankAccountBalanceDao(
			BankAccountBalanceDao bankAccountBalanceDao) {
		this.bankAccountBalanceDao = bankAccountBalanceDao;
	}

	public BankAccountDetailDao getBankAccountDetailDao() {
		return this.bankAccountDetailDao;
	}

	public void setBankAccountDetailDao(
			BankAccountDetailDao bankAccountDetailDao) {
		this.bankAccountDetailDao = bankAccountDetailDao;
	}

	public CooperBillService getCooperBillService() {
		return this.cooperBillService;
	}

	public void setCooperBillService(CooperBillService cooperBillService) {
		this.cooperBillService = cooperBillService;
	}

	public String getDialogSuccessView() {
		return this.dialogSuccessView;
	}

	public void setDialogSuccessView(String dialogSuccessView) {
		this.dialogSuccessView = dialogSuccessView;
	}

	public IdGenerator getIdGenerator() {
		return this.idGenerator;
	}

	public void setIdGenerator(IdGenerator idGenerator) {
		this.idGenerator = idGenerator;
	}

	public PayBillDao getPayBillDao() {
		return this.payBillDao;
	}

	public void setPayBillDao(PayBillDao payBillDao) {
		this.payBillDao = payBillDao;
	}

	public String getPrintView() {
		return this.printView;
	}

	public void setPrintView(String printView) {
		this.printView = printView;
	}

	public DepartmentDao getDepartmentDao() {
		return this.departmentDao;
	}

	public void setDepartmentDao(DepartmentDao departmentDao) {
		this.departmentDao = departmentDao;
	}

	public String getListForEditPriceView() {
		return this.listForEditPriceView;
	}

	public void setListForEditPriceView(String listForEditPriceView) {
		this.listForEditPriceView = listForEditPriceView;
	}

	public String getListForModifyView() {
		return this.listForModifyView;
	}

	public void setListForModifyView(String listForModifyView) {
		this.listForModifyView = listForModifyView;
	}

	public String getItemSearchResultView() {
		return this.itemSearchResultView;
	}

	public void setItemSearchResultView(String itemSearchResultView) {
		this.itemSearchResultView = itemSearchResultView;
	}

	public String getListForGatherView() {
		return this.listForGatherView;
	}

	public void setListForGatherView(String listForGatherView) {
		this.listForGatherView = listForGatherView;
	}

	public String getListForPayView() {
		return this.listForPayView;
	}

	public void setListForPayView(String listForPayView) {
		this.listForPayView = listForPayView;
	}

	public String getListForAccountFormView() {
		return this.listForAccountFormView;
	}

	public void setListForAccountFormView(String listForAccountFormView) {
		this.listForAccountFormView = listForAccountFormView;
	}

	public String getListForAccountView() {
		return this.listForAccountView;
	}

	public void setListForAccountView(String listForAccountView) {
		this.listForAccountView = listForAccountView;
	}

	public BusinessBillDao getBusinessBillDao() {
		return this.businessBillDao;
	}

	public void setBusinessBillDao(BusinessBillDao businessBillDao) {
		this.businessBillDao = businessBillDao;
	}

	public String getItemListForBusinessBillView() {
		return this.itemListForBusinessBillView;
	}

	public void setItemListForBusinessBillView(
			String itemListForBusinessBillView) {
		this.itemListForBusinessBillView = itemListForBusinessBillView;
	}

	public CodeRuleDao getCodeRuleDao() {
		return this.codeRuleDao;
	}

	public void setCodeRuleDao(CodeRuleDao codeRuleDao) {
		this.codeRuleDao = codeRuleDao;
	}

	public FinanceDetailDao getFinanceDetailDao() {
		return this.financeDetailDao;
	}

	public void setFinanceDetailDao(FinanceDetailDao financeDetailDao) {
		this.financeDetailDao = financeDetailDao;
	}

	public BusinessBillItemDao getBusinessBillItemDao() {
		return this.businessBillItemDao;
	}

	public void setBusinessBillItemDao(BusinessBillItemDao businessBillItemDao) {
		this.businessBillItemDao = businessBillItemDao;
	}

	public PayModeDao getPayModeDao() {
		return this.payModeDao;
	}

	public void setPayModeDao(PayModeDao payModeDao) {
		this.payModeDao = payModeDao;
	}

	public String getItemListForEstablishmentView() {
		return this.itemListForEstablishmentView;
	}

	public void setItemListForEstablishmentView(
			String itemListForEstablishmentView) {
		this.itemListForEstablishmentView = itemListForEstablishmentView;
	}
}